<template>
	<view class="tag">
		<actTag v-if="(activityType!=undefined || actList.length>0) && (type=='all' || type=='act') && activityType!=90" :type="activityType" :customStyle="{marginRight:'16rpx'}"/>
		<couponTag v-if="couponList.length>0 && (type=='all' || type=='coupon')" :showType="couponShowType" v-for="(coupon,index) in couponList" :coupon="coupon" :key="index" :customStyle="{marginRight:'16rpx'}"/>
	</view>
</template>

<script>
	import couponTag from './couponTag.vue'
	import actTag from './actTag.vue'
	export default{
		components:{couponTag,actTag},
		props:{
			type:{
				type:String,
				default:'all' // all 全部标签  coupon 优惠券标签  act 活动标签
			},
			// 优惠券
			couponList:{
				type:Array,
				default:()=>{}
			},
			actList:{
				type:Array,
				default:()=>{return []}
			},
			activityType:{
				type:[String,Number]
			},
			couponShowType:{
				type:[String,Number],
				default:1
			}
		}
	}
</script>

<style>
	.tag{
		display: flex;
		align-items: flex-start;
	}
</style>
